4fbd8c
@@ -193,7 +193,6 @@
public void alterTable(RawStore msdb, Warehouse wh, String dbname,
     } finally {
       if (!success) {
         msdb.rollbackTransaction();
-        throw new MetaException("Committing the alter table transaction was not successful.");
       }
       if (success && moveData) {
         // change the file name in hdfs
@@ -220,6 +219,9 @@
public void alterTable(RawStore msdb, Warehouse wh, String dbname,
         }
       }
     }
+    if (!success) {
+      throw new MetaException("Committing the alter table transaction was not successful.");
+    }
   }
 
   private boolean checkPartialPartKeysEqual(List<FieldSchema> oldPartKeys,
